@extends('front.common.header')

@section('title',$keyword.' - 青苜社区')

@section('head')
	 @parent
@stop

@section('content')
<link rel="stylesheet" type="text/css" href="{{ asset('/css/bbs/index.css') }}" />
<link href="{{ asset('/css/company/jobs.css') }}" rel="stylesheet" type="text/css">
<link href="{{ asset('/css/company/comdetails.css') }}" rel="stylesheet" type="text/css">
<div class="first_center">
    <div class="heade_m">
    	<ul>
    		<li style="width: 70px; text-align: center"><a href="{{ url('/bbs') }}">首页</a></li>
    		<li><span>|</span></li>
            <li style="padding:0 10px;text-align: center"><a href="javascript:void(0)">搜索</a></li>
        </ul>
        <div class="search fr" style="">
            <input type="text" id="bbs_keyword" name="keyword" class="bbs_keyword" placeholder="搜索话题和用户" value="{{$keyword}}">
            <input type="submit" id="bbs_searchbtn" value="" />
        </div>
        <script type="text/javascript">
			$(function(){
				$("#bbs_searchbtn").click(function(){
			        var kw = $("#bbs_keyword").val();
			        if(kw.length != 0){
			            window.location.href = '/bbs/search/'+kw;
			        }
			    });
			});
            </script>
        <div class="clr"></div>
    </div>
    <div class="bbs_search_content">
        <div class="bbs_search_title">
            为您找到“{{$keyword}}”相关结果{{$count}}个
        </div>
        <div class="bbs_search_list">
            <table class="table table-hover">
              <thead>
                <tr>
                  <th>标题</th>
                  <th>板块</th>
                  <th>作者</th>
                  <th>评论</th>
                  <th>浏览</th>
                </tr>
              </thead>
              <tbody>
                @foreach($list as $res)
                <tr style="height:50px;">
                    <td><a href="{{url('/bbs/'.$res->id)}}">{{$res->title}}</a></td>
                    <td><a href="{{url('/bbs/board/'.$res->category->id)}}">{{$res->category->title}}</a></td>
                    <td>{{$res->name}}</td>
                    <td>{{$res->answer_count}}</td>
                    <td>{{$res->view_count}}</td>
                </tr>
                @endforeach
              </tbody>
           </table>
        </div>
        <div style="text-align:center">{!! $list->render() !!} </div>
    </div>
</div>
@stop

@section('footer')
	@parent
@stop

